package io.cici.cc.mybatis.lite.sql_source.scripting.tagHandler;

import io.cici.cc.mybatis.lite.sql_source.scripting.tag.BindTag;
import io.cici.cc.mybatis.lite.sql_source.scripting.tag.Tag;

import java.util.List;

public class BindTagHandler implements TagHandler {
    public BindTagHandler() {
        // Prevent Synthetic Access
    }

    @Override
    public void handle(io.cici.cc.mybatis.lite.parse.Node nodeToHandle, List<Tag> tagList) {
        final String name = nodeToHandle.getStringAttribute("name");
        final String expression = nodeToHandle.getStringAttribute("value");
        final BindTag bindTag = new BindTag(name, expression);
        tagList.add(bindTag);
    }
}
